var arr =[98,51,512,65,32,64,15];
console.log(arr);
for(var j = 0;j<arr.length;j++){
	for(var i=0;i<arr.length;i++){
		if(arr[i]>arr[i+1]){
			var temp=arr[i];
			arr[i]=arr[i+1];
			arr[i+1]=temp;
		}
	}
}